package com.example.sign

import com.example.base.mvi.BaseViewModel
import com.example.base.net.ApiService
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject
@HiltViewModel
class SignViewModel @Inject constructor(val apiService: ApiService):BaseViewModel<SignIntent>() {
    override fun handleIntent(it: SignIntent) {
        when(it){
            is SignIntent.sign -> {
                httpRequest(apiService.sign(toBody(it.item)))
            }

            is SignIntent.signRecord -> {
                httpRequest(apiService.signRecord(it.userid))
            }
        }
    }
}